]> dgit.raspbian.org Git - gnome-shell.git/commit
dash: Fix some JS warnings
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 13 Jun 2017 01:41:42 +0000 (03:41 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 13 Jul 2017 15:23:54 +0000 (17:23 +0200)
commit2a01606c59894b366ff9fbbeb7cadda2d5c70dc8
tree53ab30026926257f3a6b417d9c9dce1167c333e3
parente2f88d67f7d6d9f02a80f6867f905055827ac424
dash: Fix some JS warnings

We currently use "array[index]" to test whether an array has an
element at index before using it. However nowadays gjs warns about
accessing non-existent array elements, so the test itself already
produces a warning. Avoid this by checking the array length before
using an index to access an element.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
js/ui/dash.js